package cn.virens.database.mysql.mapper.sys;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import cn.virens.database.common.BaseMapper;
import cn.virens.database.mysql.model.sys.SysUser;

/**
 * 用户表（user） Mapper 接口
 *
 * @author Virens
 * @since  2017-10-22
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

	@ResultType(String.class)
	@Select("SELECT `password` FROM sys_user WHERE `account` = #{a} OR `openid` = #{a}")
	String login(@Param("a") String account);

	SysUser findUser(@Param("a") String account);

	List<SysUser> selectSimple(Map<String, Object> param);
}